package com.buss.admin.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.buss.common.service.impl.FileUploadService;

@Controller
@RequestMapping("/file")
public class FileController {

	@Autowired
	private FileUploadService fileUploadService;

	@RequestMapping("/upload")
	@ResponseBody
	public Map fileUpload(@RequestParam MultipartFile uploadFile) {

		Map result = fileUploadService.uploadFile(uploadFile);
		return result;
	}

}
